import React from 'react'
import store from './redux/store'

export default function App() {
    return (
        <div>
            <button onClick={() => {
                if (store.getState().list1.length === 0) {
                    store.dispatch({
                        type: "get-list"
                    })
                    console.log("get list")
                } else {
                    console.log("缓存", store.getState().list1)
                }
            }}>click-ajax-异步缓存</button>
        </div>
    )
}
